package com.xlserver.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xlserver.domain.Supervisor;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SupervisorMapper extends BaseMapper<Supervisor> {
    @Select("SELECT sid,sName AS name,sProfilePhoto AS profilePhoto,sAssistanceCompleted AS assistanceCompleted,sAssistanceTime AS assistanceTime,sSchedule AS schedule,sUsername AS username,sGender AS gender,sAge AS age,sIdNumber AS idNumber,sPhoneNum AS phoneNum,sEmail AS email,sJob AS job,sTitle AS title,sCertification AS certification,sCertificationId AS certificationId FROM supervisor_info WHERE SUBSTRING(sSchedule,#{weekIndex},1)=1")
    List<Supervisor> selectTodaySupervisor(int week);
}
